<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>this</title>
</head>
<body>


<script>


    function fn(num) {
        console.log("fn:" + num);
        // count用于记录fn的被调用次数
        this.count++;
    }

    fn.count = 0;
    for (var i = 0; i < 10; i++) {
        if (i > 5) {
            fn(i);
        }
    }

    console.log(fn.count);
</script>
</body>
</html>